using System;
using System.Collections.Generic;
using QuanLyKhachSan.BUS;
using QuanLyKhachSan.DAO;
using System.Text;
using System.Data;

namespace QuanLyKhachSan.BUS
{
    public enum HoaDonBUSResult
    {
        OK,
        NGAYLAPHOADONERROR,
        TONGTIENERROR,
        KHACHHANGERROR,
        DAOERROR
    }
    public class HoaDonBUS
    {
        public static DataTable LayDanhSachHoaDon()
        {
            return HoaDonDAO.LayDanhSachHoaDon();
        }

        public static DataTable LayDanhSachHoaDon(int maKhachHang)
        {
            return HoaDonDAO.LayDanhSachHoaDon();
        }

        public static HoaDonBUSResult Insert(HoaDonDTO hoaDondto)
        {
            if (!HoaDonDAO.Insert(hoaDondto))
                return HoaDonBUSResult.DAOERROR;
            return HoaDonBUSResult.OK;
        }
        public static DataTable LayMaHoaDonMoiThem()
        {
            return HoaDonDAO.LayMaHoaDonMoiThem();
        }
    }
}
